package com.padgett.resourcemanagement.util;


public class ClientNameSortable implements Comparable<ClientNameSortable> {
	private String clientId;
	private String name;
	
	public ClientNameSortable(String clientId, String name) {
		this.clientId = clientId;
		this.name = name;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int compareTo(ClientNameSortable clientNameSortable) {
		System.out.println("Original:"+this.name+",Comparing:"+clientNameSortable.name);
		if(name==null){
			return -1;
		}
		if(clientNameSortable.name==null){
			return 1;
		}
		return name.compareTo(clientNameSortable.name);
	}

}
